Skip to content

sed: allow one address for q, and for l with --posix - #694

Merged
sylvestre merged 1 commit into
uutils:mainfrom
yunusarda-sudo:sed-q-one-address
Nov 18, 2026
Merged

sylvestre merged 1 commit into
uutils:mainfrom
yunusarda-sudo:sed-q-one-address

Conversation

@yunusarda-sudo

Copy link
Copy Markdown
Contributor

2,3q was accepted and quit on line 2, and --posix '2,3l' was accepted. GNU sed allows only one address for q in every mode, and for l under --posix; both now fail at compile time with exit status 1, like the other one-address commands. Q was already limited to one address.

Dropped q from the address-range extensions listed in docs/src/extensions.md. Added tests for q/Q with a range and for l with and without --posix.

Closes #689

Signed-off-by: Yunus Arda Güney <64425746+yunusarda-sudo@users.noreply.github.com>
@codecov

codecov Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.43%. Comparing base (28b24c6) to head (3ab253a).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #694   +/-   ##
=======================================
  Coverage   95.43%   95.43%           
=======================================
  Files          14       14           
  Lines        7738     7738           
  Branches      465      465           
=======================================
  Hits         7385     7385           
  Misses        352      352           
  Partials        1        1           
Flag Coverage Δ
macos_latest 96.89% <100.00%> (ø)
ubuntu_latest 96.82% <100.00%> (ø)
windows_latest 0.00% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sylvestre
sylvestre merged commit 6135beb into uutils:main Nov 18, 2026
32 checks passed
@sylvestre

Copy link
Copy Markdown
Contributor

Thanks for your PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sed - q accepts an address range, and so does l under --posix

2 participants